from sqlalchemy import Column, ForeignKey, INTEGER, TIMESTAMP
from utils.db import Base


class Flight(Base):
    __tablename__ = "flight"

    id = Column(INTEGER, primary_key=True, autoincrement=True)
    user_id = Column(INTEGER,
                     ForeignKey("user.id"), unique=True, nullable=False)
    region_id = Column(INTEGER,
                       ForeignKey("region.id", name="dispath"), nullable=False)
    time_end = Column(TIMESTAMP, nullable=False)
